
// 可售部门
export const saleList = [
  {
    name: '部门一',
    value: '1'
  },
  {
    name: '部门二',
    value: '2'
  }
]
export const columns = ctx => {
  return [
    {
      prop: 'productCode',
      label: '产品编码',
      headCheck: '1'
    },
    {
      prop: 'businessTypeName',
      label: '业务类型',
      headCheck: '1'
    },
    {
      prop: 'name',
      label: '产品名称',
      headCheck: '1'
    },
    {
      prop: 'typeName',
      label: '产品类型',
      headCheck: '1'
    },
    {
      prop: 'apartmentName',
      label: '可售部门',
      headCheck: '1',
      toolTip: true
    },
    {
      prop: 'exchangeRangeName',
      label: '兑换范围'
    },
    {
      label: '操作',
      headFixed: '1',
      // headCheck: '1',

      render: (h, row, index) => {
        return [
          <el-link
            underline={false}
            type="primary"
            class="mr10"
            onClick={() => { ctx.operation('detail', row) }}
          >
            详情
          </el-link>,
          <el-link
            underline={false}
            type="primary"
            class="mr10"
            v-show={+row.status === 2}
            onClick={() => { ctx.operation('up', row) }}
          >
          上架
          </el-link>,
          <el-link
            underline={false}
            type="primary"
            class="mr10"
            v-show={+row.status === 1}
            onClick={() => { ctx.operation('down', row) }}
          >
          下架
          </el-link>,
          <el-link
            underline={false}
            type="primary"
            class="mr10"
            onClick={() => { ctx.operation('del', row) }}
          >
          删除
          </el-link>
        ]
      }
    }
  ]
}
